{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=361
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,j,n,m:longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n,m);
dec(n);
dec(m);
for i:=0 to n do begin
	for j:=0 to m do   	
		write(int64(i)*int64(j),' ');
	writeln;
end;
end.